# gospinner

**Table Of Contents**

- [Intro](#intro)
    - [License](#license)
- [Learn](#learn)
    - [Module](#module)
    - [Use](#use)
- [Start](#start)
    - [Get](#get)
    - [Update](#update)

## Intro

Go library for animation in the terminal.

### License

The [gospinner](https://notabug.org/_percival/gospinner) is free software: you can redistribute it and/or modify it under the terms of the [GNU General Public License Version 3](https://gnu.org/licenses/gpl-3.0.html).

## Learn

### Module

For more information about the module, use the [link](https://pkg.go.dev/notabug.org/_percival/gospinner).

### Use

Run live ellipsis three iterations:

```
gospinner.Spinner{
	Frame: func(s gospinner.Spinner) {
		fmt.Print(goescape.Cursor().Save + goescape.Cursor().Hide)

		for i := 0; i < 3; i++ {
			for n := 0; n < 3; n++ {
				time.Sleep(time.Second)

				fmt.Print(s.Gens[0][0]())
			}

			time.Sleep(time.Second)

			fmt.Print(goescape.Cursor().Restore + "   " + goescape.Cursor().Restore)
		}
	},
	Gens: [][]func(data ...interface{}) string {
		[]func(...interface{}) string{
			func(data ...interface{}) string {
				return "."
			},
		},
	},
	Defer: func() {
		fmt.Print(goescape.Cursor().Show)
	},
}.Start()
```

## Start

### Get

To get, execute the command:

**~ $** `go get -v notabug.org/_percival/gospinner@latest`

### Update

To update, execute the command:

**~ $** `go get -u -v notabug.org/_percival/gospinner@latest`
